package com.zhiyou.eame.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import com.zhiyou.eame.model.EameModel;
import com.zhiyou.eame.service.IEameService;

@Controller
@RequestMapping("/admin")
public class eame {
	@Autowired
	IEameService service;
	
	
	 @RequestMapping(value="index.do")
     public String index(EameModel query,Model model){
    	 List<EameModel> eame = service.query(query);
    	 model.addAttribute("eame", eame);
    	 System.out.println("......");
    	 return "admin/index";
     }
	 
	 @ResponseBody
	 @RequestMapping(value="index.do",method=RequestMethod.POST)
     public String eame(){
    	 
    	 return "admin/index";
     }
}
